# Maintainer: Jiachen Yang <farseerfc@archlinux.org>
# Contributor: Felix Yan <felixonmars@archlinux.org>
# Contributor: jeneshicc <jeneshicc@gmail.com>

pkgname=skk-jisyo
pkgver=20221030
pkgrel=1
pkgdesc="Dictionaries for the SKK Japanese input method"
arch=('any')
url="http://openlab.ring.gr.jp/skk/"
optdepends=('skktools: Dictionary maintenance tools')
license=('GPL')
install=${pkgname}.install

_skk_jisyo_gz=(L
               M
               ML
               S
               JIS2
               JIS2004
               JIS3_4
               assoc
               china_taiwan
               fullname
               geo
               itaiji
               itaiji.JIS3_4
               jinmei
               law
               lisp
               mazegaki
               okinawa
               propernoun
               pubdic+
               requested
               station
               wrong
               wrong.annotated)

source=()
for _t in "${_skk_jisyo_gz[@]}" ; do
  source+=("SKK-JISYO.$_t.$pkgver.gz::http://openlab.ring.gr.jp/skk/dic/SKK-JISYO.$_t.gz")
done

sha512sums=('92437c4d89b8959594e3d8b263903919797aac70ce53778b75a0ff99fa3e00cd606e079fca3b07ad93067936cc93b20fb588a2dbc34bcc234249cadd85d655f0'
            '9104143e26c21b62668d6aafb19a8e8f6cbe99d40896cfca2946b8f8d0fbf12b706723b0a4edad27aa6cb3be34a43c2f0a419965b289c1349fdfc364679f0606'
            'bd21a9290d6b7c20ec3e2df67ea438bc5408340b1f8d99a61f937a0952ab292c6899dcf6827027e4d55f195c55d8950ceef3427d0c1c18a41d13f6ec45274972'
            'd2818d63b7c5f807651dc6978bdcfea5c1ac8003da9ebbe24c908ba0fdf13a304c01c3c181993c31377ce93790a67a3518b782374b66ca8c76e1ecc305bf77a4'
            'df34831e6e254443193ff8ccf0290f8105c153f559bfdde694b179ae8cf3e3405e2ba6965f700a80ddb08329871ee418b8b8779d80154116f2608fffb5b58b80'
            '8bbdc4176093be79e6ca9e3e518401fa9c7a781f67bb74ca1a86cf90c133fe1ea0388a0ca4e9b7a99bde5ba237eccd2c7eb5341589a18fe5b15eec695a6dbc41'
            'd20909169d970b41855b8b7f34ad08bd40f9e5f24981c00c0c0f377280ad87f63c1b963360dda2a5ad07efcf54a850a421c7a3dbc28bf92d6894809bec91d3d1'
            'f52a5836870cda0a3a48b2473a093552f3cadfd6b1b5f584fe668a95f9e9d905e7cb4f8ec6c5a86399bafe78ccccb9d3a2ec215cf95d0278b3c3418caa3dfaf0'
            'e1a76deefb378cf5fe5422e17e72180a811685c09ca5afcf1cee6564afcd48c815ee52900895820c3223e56d955f68e804034e967f04230742aa54f01dc9f1e1'
            '085215ffce63af7c5397e7db688e74f00c617a61688ee7a950e7be791962e9cd5a9f01e955415176c98fc37816a4852c3f698e4f3471cc9b77de5f09f229db28'
            'a4bb2e5edd0c3e65a1a9166860f0ea0021ef69c570dff514016ee256b5219f538cc1e0f7f3738a8eb7269e25b6757ad3cf2292592c98ccb1428ce017e2dd7f12'
            '3fe5fb21d553d21f7ffdd0ed689c610e9d045f76ce605da2f615bed5a62c7ea3d61c5f1de4ba9c9aeb2d737346d5308035ca85c1ec2558f2820fe6037d88ce7a'
            'f7cec0d34cdce69f14e0514851b38763d8457445923bbe7cd67724b2615a8194c868fc5db339c109af4f360ccd1684d64cc3dafe18806011ac84b0fbc8e6c24c'
            'dcdabf07459f8747a6dcb07120cdb5f6d89d3d9b402330215be6e3828f4f072c18c5250fafa73603c436d7db3380eb469a75e30117bcc4fcbfce583ad8b71b64'
            'c6a83e5bfba5f7d03f632eef594a00093b721176215997195f12f78c3f3f9dfcfff4d795f7e7ce4612dfbf0c6c3ce67b64e2bce7385d663ccef346fe32ae9967'
            'e93ad4e50182f747f6b37fa81944b6bad447f4076adf11c444bef1d3a8c1e8dafd0c69b4a40716e45a4c4ae567dabcd49b617437e84cccf7f79d8ae32aedfb07'
            '8b0780182d4c943ad5e36b3a8b64ca3484c3debf09986bfb2c881848afeac8144e570e1ee36ae4b7e710d81ffd7bb64d249d971a690b7b8fa2d64b5a953fa3fc'
            '03998eaf7c7935481141b6687cbf712fad54a831d9e93b84a936a7fe896f8005abfd1ea9245dcae901bfa6354d44424ddd09d519af8a5e885607ba9aa8202b4e'
            '7439640d0f81fbee38de7200bf32fd83115958255c92e3b8b4413a7a687aa5b5e721a11f99bf54669a13d691ccae83dc71fe0beffa63415949c536f84db0b290'
            'a2cd46c79a623540e4adc1c3c4a441686faf7c7851c4bc99b400f045bbce4f3cb3bc65dc4be456669b683ea4fe0b5469c959da1956d291749fb3b52e0c588064'
            '464da7fb52c2427a154129b2440b1c4eb314c384ddab0f9dbe68b0ba6f2088171b7de8ee727bcdc2bf7f9ee8422bf5bf6dad5226fd6ae583727a56a195201bb7'
            'b6ec4c742124a35ea6f2bd314dd40106c1ca58cd3d5bc9c836a423f42e3d31797862038de1bd2ad69b3f96336215f7fc39bcf9a6442277797f3013519436043b'
            '182ee7ee77633b6b501a31cbfd18845f5907353a0f02302114f6a9f9450d6fb540514ab484539e3f6e5253ea34a577dad0ec410c6e64a7ffc6aa074107003476'
            '56bba4617a84a3da349b3beb3d33e43e473dfe2af0833158f9771e662ddb124b950389d0cc5efaf5afe375ebe192d02d4ac70efbafb2419717d45b64d273b1cd')


package() {
  mkdir jisyo
  for _t in "${_skk_jisyo_gz[@]}" ; do
    cp "SKK-JISYO.$_t.$pkgver.gz" "jisyo/SKK-JISYO.$_t.$pkgver.gz"
    gunzip "jisyo/SKK-JISYO.$_t.$pkgver.gz"
    install -D -m 644 "jisyo/SKK-JISYO.$_t.$pkgver" "$pkgdir/usr/share/skk/SKK-JISYO.$_t"
  done
}
